package com.qiaofang.service;

import com.qiaofang.common.model.PageDTO;
import com.qiaofang.common.model.UiListBean;
import com.qiaofang.common.model.UiSelectBean;
import com.qiaofang.dto.ListPartnerInfoDTO;
import com.qiaofang.dto.PartnerInfoDTO;
import com.qiaofang.entity.PartnerInfo;
import com.qiaofang.vo.PartnerInfoVO;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface PartnerInfoService {

    UiListBean<PartnerInfoVO> listPartnerInfo(ListPartnerInfoDTO dto, PageDTO pageDTO);

    void addPartnerInfo(PartnerInfoDTO partnerInfoDTO);

    void updatePartnerInfo(PartnerInfoDTO partnerInfoDTO);

    PartnerInfoVO getPartnerInfo(Long id);

    void enablePartnerInfo(Long id);

    void disablePartnerInfo(Long id);

    void deletePartnerInfo(Long id);

    void installAdminPartnerInfo(Long id);

    void cancelAdminPartnerInfo(Long id);

    void batchEnablePartnerInfo(List<Long> ids);

    void batchDisablePartnerInfo(List<Long> ids);

    void batchDeletePartnerInfo(List<Long> ids);

    /**
     * 查询管理员账户
     *
     * @param id
     * @return
     */
    PartnerInfoVO getAdminPartnerInfoByCompanyId(Long id);

    /**
     * 根据companyId
     *
     * @param type
     * @return
     */
    List<UiSelectBean> listPartnerInfo(Long type, Long companyId);

    /**
     * 查询人员
     *
     * @param ids
     * @return
     */
    Map<Long, PartnerInfo> listPartnerInfo(List<Long> ids);

    List<PartnerInfo> listPartnerInfoByName(Set<String> residentNameList, List<String> companyIds);

    List<PartnerInfo> listPartnerInfoByPhone(Set<String> phoneList, List<String> companyIds);

    List<PartnerInfo> selectListByDto(PartnerInfoDTO partnerInfoDTO);

    void addPartnerInfo(PartnerInfo partnerInfo);

    void cleanPartnerCache(Long id);
}
